<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="{:U('Admin/Bases/baseList')}" method="post">
        <input type="hidden" name="pageSize" value="{$pageSize}">
        <input type="hidden" name="pageCurrent" value="{$pageCurrent}">
        <input type="hidden" name="orderField" value="{$orderField}">
        <input type="hidden" name="orderDirection" value="{$orderDirection}">
        <div class="bjui-searchBar">
            <label>基地名称：</label><input type="text" name="name" value="{$params.name}" class="form-control" size="20">&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);" data-icon="undo">清空查询</a>
        </div>
    </form>
    <div style="margin:10px 0;">
        <if condition="checkRule('Admin/Bases/addBase')">
        <a class="btn btn-green" href="{:U('Admin/Bases/addBase')}" data-toggle="navtab" data-id="Admin/Bases/addBase">添加基地</a>
        </if>
        <if condition="checkRule('Admin/Bases/delBase')">
        <a class="btn btn-red" href="{:U('Admin/Bases/delBase')}" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中基地吗？" data-idname="ids" data-group="ids">批量删除</a>
        </if>
    </div>
</div>
<div class="bjui-pageContent tableContent">
    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
        <thead>
            <tr>
                <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th data-order-field="id">ID</th>
                <th data-order-field="name">基地名称</th>
                <th data-order-field="area">基地面积(平方米)</th>
                <th>备注说明</th>
                <th>基地地址</th>
                <th data-order-field="add_time">添加时间</th>
                <th width="100">操作</th>
            </tr>
        </thead>
        <tbody>
        <notempty name="list">
            <foreach name="list" item="vo" key="k">
                <tr data-id="{$vo.id}">
                    <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$vo.id}"></td>
                    <td>{$vo.id}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.area}</td>
                    <td>{$vo.remark}</td>
                    <td>{$vo.addr}</td>
                    <td>{$vo.add_time}</td>
                    <td>
                        <if condition="checkRule('Admin/Bases/updBase')">
                            <a href="{:U('Admin/Bases/updBase', array('baseId' => $vo['id']))}" class="btn btn-green" data-toggle="navtab" data-id="Admin/Bases/updBase">编辑</a>
                        </if>
                        <if condition="checkRule('Admin/Bases/delBase')">
                            <a href="{:U('Admin/Bases/delBase', array('ids' => $vo['id']))}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该基地吗？">删</a>
                        </if>
                    </td>
                </tr>
            </foreach>
        </notempty>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="30" <if condition="$pageSize eq 30">selected="selected"</if>>30</option>
                <option value="60" <if condition="$pageSize eq 60">selected="selected"</if>>60</option>
                <option value="120" <if condition="$pageSize eq 120">selected="selected"</if>>120</option>
                <option value="150" <if condition="$pageSize eq 150">selected="selected"</if>>150</option>
            </select>
        </div>
        <span>&nbsp;条，共 {$total} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="{$total}" data-page-size="{$pageSize}" data-page-current="{$pageCurrent}"></div>
</div>